This invention relates generally to a processor performing programmed operations in accordance with instructions and data stored in memory and more particularly to a microprogram control circuit for detecting an indefinite state, that is, a runaway condition wherein the processor cannot complete a program of instructions and operates continuously. In many microprogram control circuits of the prior art, microinstructions within a program memory are read from selected addresses and executed in response to trigger signals generated within or externally of the circuit. After the entire program is executed, the output of a clock signal from a clock signal generating circuit, is stopped in response to one particular microinstruction, for example, a HALT instruction. Then, the processor waits in the stop condition for a restart.
However, in such a microprogram control system there is significant danger that the system may enter an indefinite state and runaway, that is, not arrive at the HALT instruction. This can occur due to external factors and principally occurs due to an instability in the power source voltage level.
The problem can also arise if processing has been resumed too soon after a HALT. In a conventional microprogram control system of the prior art, a power-on-clear circuit is actuated at the time when power is applied to the system and the power-on-clear circuit causes the program counter, which selects the addresses of the program in memory, to set to an initial state, usually the first memory address. Moreover, other flag elements which are not generally operated in response to a microinstruction are also set to an initial state in response to the power-on-clear circuit signals. When the time is short between power off and power on conditions, the power-on-clear circuit may not return to the internal conditions which allow a proper signal which restarts the computer at the suitable initial address and conditions. As a result, the computer malfunctions and may achieve an indefinite condition or runaway so that a program is never completed as indicated by a HALT istruction.
What is needed is a microprogram control circuit which detects an indefinite condition in program performance and an absence of a HALT instruction, and automatically stops the computer processing and allows for automatic or externally actuated restarting at the proper conditions whereby the program is reinitialized.